home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / presto / presto10.lha / README < prev    next >
Text File  |  1991-12-13  |  8KB  |  192 lines

  1.                 Presto 1.0
  2.             ----------
  3.  
  4. This file tree contains PRESTO, PRESTO documentation, and
  5. Symmetry C++ hints.  The PRESTO code runs in the bsd universe of
  6. Sequent Symmetry DYNIX 3.0, on Sun 3 SunOS 3.3, 3.5, and 4.0,
  7. VAX Ultrix 2.3, and MIPS Ultrix 4.1/4.2
  8.  
  9. *********************
  10. IMPORTANT NOTE FOR PRESTO 1.0
  11.  
  12.     This version of Presto has been tested and used ONLY
  13.     on Sequent Symmetry Dynix 3.0 and MIPS/Ultrix 4.1/4.2.
  14.  
  15.     NO WORK has been done on the Sun 68XXX ports, or the VAX
  16.     port. It probably wouldn't be every difficult to get this
  17.     running, and it would probably be easy to use the MIPS
  18.     version for a SPARC port. We have not done this, however.
  19. *********************
  20.  
  21. PRESTO was developed at the University of Washington Department of
  22. Computer Science.  See the ./Manual directory for more information.
  23.  
  24. PRESTO was ported to MIPS/Ultrix by Brian Bershad, Raj Vaswani and
  25. Paul Barton-Davis at the University of Washington.
  26.  
  27. PRESTO was ported to the Sun 3 at the Rice University
  28. Department of Electrical and Computer Engineering.  Jim Carson
  29. (carson@rice.edu, ...uunet!rice!mu!carson) did most of the work.
  30. He has offered to field questions specifically related to the Sun port.
  31. Please do not send him any questions about PRESTO in general.
  32.  
  33. This Version
  34. ------------
  35.  
  36. This version of Presto is the first "official" port to a modern C++
  37. language definition.  Both AT&T C++2.1 and DEC's new native C++
  38. compiler were used during the work.
  39.  
  40. It is based on a version used more or less only at the University of
  41. Washington (often known as "Faust Presto", after John Faust who did
  42. many of the modifications that distinguish it from Presto 0.4) Most of
  43. the work in porting Presto was done Paul Barton-Davis at UW. Thanks to
  44. I.Ashok for some ideas and Steve Clamage of TauMetric for help with
  45. pointers to member functions.
  46.  
  47. This version contains several of the more successful modifications to PRESTO
  48. made to date:  local thread queues, local ready queues, fixed size stacks,
  49. create/delete code path cleanup, and both styles of spinlock (original and
  50. queue-based).  It contains the fix to allow GPROF to collect uniprocessor
  51. results properly, a fix for a floating point preemption problem (see
  52. the #ifdef  FPU_PREEMPT code) and it allows for processor affinity.
  53.  
  54. MIPS Port
  55. ---------
  56.  
  57. This version of Presto has also been ported to the MIPS RISC
  58. architecture under Ultrix 4.1 & 4.2. Assembly language functions
  59. provide an atomic test-and-set, and the only significant difference
  60. between the MIPS and Symmetry versions is that threads may only be
  61. passed a single argument when started (which can, of course, be a
  62. pointer to an array). See threads.h for details. This port has been
  63. used for an operating systems class taught on uniprocessor
  64. DECstations, where it acted as the underlying thread mechanism for a
  65. "small os".
  66.  
  67. Bug Alert
  68. ---------
  69.  
  70. DEC's native C++ compiler, cxx, cannot correctly compile the Presto
  71. thread start code with debugging enabled. The error is in register
  72. allocation, and seems to be a subtlety that DEC themselves suffer from
  73. with their own CMA threads package. This means that you can't debug
  74. Presto internals on a DECstation if you use cxx. AT&T cfront works
  75. fine (but of course, you can't symbolically debug that either).
  76.  
  77. AT&T C++ on a Symmetry
  78. ----------------------
  79.  
  80. The directory seq_c++ contains patches to help you compile
  81. AT&T C++ 2.1 on a Sequent Symmetry. This includes the "missing" patch
  82. that was not included in the original Presto distribution, and whose
  83. abscence prevents the correct declaration of shared or private
  84. pointers to int or char.
  85.  
  86. User's Guide additions:
  87. -----------------------
  88.  
  89. o The high contention spinlocks and atomic integers have the exact same
  90.   interface as the original spinlock and atomic integer classes.  The
  91.   names of the new classes are HC_Spinlock and HC_AtomicInt.
  92.  
  93. o To turn on processor affinity, set affinity=1 in your Main::init()
  94.   function.
  95.  
  96. o The fixed size stack modification improves performance at the loss of
  97.   generality.  All thread stacks are now the same size, the default is 16K.
  98.   To override this default value, you must set stacksize to the appropriate
  99.   value in Main::init().
  100.  
  101. Design Changes from UW-Faust Presto
  102. -----------------------------------
  103.  
  104. Affinity
  105. --------
  106.  
  107.     Setting affinity before a fork is a bad idea, since affinity is
  108.     inherited across a fork(). This reduces some potential concurrency,
  109.     because both child and parent both claim to be bound to the same
  110.     processor, effectively blocking the parent until the child frees
  111.     up the processor. Several "structural" changes have been made to
  112.     reverse the order of the fork and affinity settings. This is at
  113.     once both a deep change (because of the need to change the Presto 
  114.     startup process, and a shallow one, because not extra functionality
  115.     is gained (except for a little performance).
  116.  
  117. Starting Threads
  118. -----------------
  119.  
  120.     Presto has a very confused of what a pointer to a member function
  121.     is, which it inherited from similar confusion in AT&T C++ 1.2.
  122.  
  123.     In the current C++ language definition, it is a fundamental
  124.     error to confuse such a pointer with a pointer to a function, 
  125.     Because of this:
  126.  
  127.     1) User-written presto programs should NOT use ptrs to member
  128.         functions as the second argument to a Thread::start()
  129.         call. Only global functions (including extern "C"
  130.         functions) will be supported by Presto in the future.
  131.  
  132.     2) The startup code has some additional global functions
  133.         defined that allow Presto internals to follow this
  134.         practice. It looks kludgey, and it is, but its rooted
  135.         in Presto's fallacy that a C++ ptr to member function can
  136.         be treated like a ptr to function.
  137.  
  138.         See presto.c and process.c for the functions:
  139.  
  140.             start_Scheduler()
  141.             start_Main()
  142.             start_Process()
  143.  
  144. General Stuff
  145. -------------
  146.  
  147. If your site retrieves a copy of PRESTO, please let us know with
  148. email to presto@cs.washington.edu or uw-june!presto.  You may
  149. also address any criticism of PRESTO to these addresses.  We
  150. may reply; then again, we may not.
  151.  
  152. You will see references to the Sequent Balance and non-Ultrix
  153. BSD-like VAX systems.  However, we make no claims regarding
  154. the suitability of this code to those systems.
  155.  
  156. The common source code for all versions of PRESTO is in ./src.
  157. The subdirectories of src contain versions of the source files
  158. which are specific to the PRESTO versions for particular
  159. machines or operating systems.
  160.  
  161. The directories sequent, sun, and vax contain symbolic links to
  162. the appropriate versions of the source files in the src directory.
  163. The directories contain makefiles which make versions of the PRESTO
  164. library appropriate for each system.
  165.  
  166.     sequent     -- Sequent Symmetry
  167.     mips         -- MIPSEL Decstations running Ultrix 4.X
  168.  
  169. The sequent & mips directories each have a subdirectory called "test"
  170. which contains some simple PRESTO applications and tests.  The
  171. different versions of the tests are built from common source files in
  172. ./test.  The system-specific test directories contain symbolic links
  173. into the top-level test directory.
  174.  
  175. For example, to make a version of the PRESTO library and all the tests
  176. for the sequent, the correct sequence of commands would be:
  177.  
  178.     makelinks sequent
  179.     cd sequent ; make
  180.     cd test ; make
  181.  
  182. Alternatively, you can say "make sequent" in this top level directory.
  183. This will make all the links, libraries and test programs, and then
  184. run the tests.
  185.  
  186. To get rid of the links, use "make cleanlinks" (this doesn't do
  187. anything very clever).
  188.  
  189. All directory makefiles also have a "make clean" directive which
  190. removes everything but the source file links.
  191.  
  192.